#!/usr/bin/env node
const fs=require("fs"),
      fileName=process.argv[2] || __filename,
      log=console.log;

let num=1;

try{
 //let  buf1=fs.readFileSync(fileName).toString('utf8').split('\n');
 //for(let i=0;i<buf1.length;i++){
   //let n=i+1;
   //log(n+'  '+buf1[i]);
   //
   fs.readFileSync(fileName)
     .toString('utf8')
     .split('\n')
     .forEach((line)=>log(`${num++}\t${line}`));
 }catch(e){
  log(e.message);
  process.exit(1);
}
